package top.dotgo.model.shop.bean;

import cn.hutool.core.bean.BeanUtil;
import lombok.Getter;
import lombok.Setter;
import lombok.experimental.Accessors;
import top.dotgo.model.IBaseBean;
import top.dotgo.model.shop.ShopOrgEntity;

import java.io.Serializable;

/**
 * 商家 组织机构(ShopOrg)对象bean
 *
 * @author jornl
 * @date 2020-04-15 10:21:18
 */
@Getter
@Setter
@Accessors(chain = true)
public class ShopOrgBean extends ShopOrgEntity implements IBaseBean, Serializable {

    public static ShopOrgBean bean(ShopOrgEntity entity) {
        ShopOrgBean bean = new ShopOrgBean();
        BeanUtil.copyProperties(entity, bean);
        return bean;
    }

    @Override
    public ShopOrgEntity entity() {
        ShopOrgEntity entity = new ShopOrgEntity();
        BeanUtil.copyProperties(this, entity);
        return entity;
    }


}
